package com.koron.order.overhaul.notified;

import com.alibaba.fastjson.JSON;
import com.koron.order.overhaul.bean.vo.OverhaulOrderDetailVO;
import com.koron.order.overhaul.utils.Constants;
import lombok.extern.slf4j.Slf4j;
import org.koron.ebs.mybatis.SessionFactory;
import org.springframework.stereotype.Component;

/**
 * @author twcao
 * @title: OverhaulOrderArchived
 * @projectName GDH_EAM_V2
 * @description: 大修工单-已归档
 * @date 2021/10/815:08
 */
@Slf4j
@Component
public class OverhaulOrderArchived implements OverhaulOrderNotify<OverhaulOrderDetailVO> {

    @Override
    public boolean execute(SessionFactory factory, OverhaulOrderDetailVO vo) {
        log.info("大修工单-已归档，vo = {}", JSON.toJSONString(vo));
        return true;
    }

    @Override
    public int getOrder() {
        return 90006;
    }

    @Override
    public String status() {
        return Constants.OverhaulStatus.ARCHIVED;
    }
}
